﻿@if (Node.Kind != AIStudio.Util.DiagramEntity.NodeKinds.Decide)
{
    <div class="default-node @(Node.Group != null ? "grouped" : "") @(Node.Selected ? "selected" : "")">
        <div class="divleft" style="border-left: 6px solid @Node.Color;">
            <span class="spancenter">
                @Node.Title
            </span>
        </div>

        @foreach (var port in Node.Ports)
        {
            <PortRenderer Port="port" Class="default"></PortRenderer>
        }
    </div>
}
else
{
    <div class="default-node @(Node.Group != null ? "grouped" : "") @(Node.Selected ? "selected" : "")" style="border-radius: 30px">
        @Node.Title
        @foreach (var port in Node.Ports)
        {
            <PortRenderer Port="port" Class="default"></PortRenderer>
        }
    </div>
}



<style>
    .divleft {
        float: left;
        width: 100%;
        height: 100%;
        border-radius: 10px;        
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .spancenter {
        margin-left: -6px;
    }

</style>
@code {
    [Parameter]
    public FlowchartNodelModel Node { get; set; }
}